<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <body>

        This text above will not be displayed.

        <ui:composition template="/resource/facelets/layout.xhtml">

            <ui:define name="top">
                Texto no topo
            </ui:define>

            <ui:define name="left">
                Menu<br/>
                Teste
            </ui:define>

            <ui:define name="content">
                <f:view id="view">
                    <h:form id="contentForm">


                        <br/><br/>

                        <h1><h:outputText value="User:"/></h1>
                        <h:outputText value="Username: #{userMB.user.username}"/><br/>
                        <h:outputText value="Password: #{userMB.user.password}"/><br/>
                        <h:outputText value="e-mail: #{userMB.user.email}"/><br/>
                        <br/>
                        <h2><h:outputText value="List"/></h2>
                        <h:dataTable value="#{userMB.user.events}" var="item2"
                                     styleClass="dataTable"
                                     headerClass="dataTableHeader"
                                     rowClasses="dataTableRowOdd,dataTableRowEven"
                                     cellpadding="2">
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="EventId"/>
                                </f:facet>
                                <h:outputText value="#{item2.eventId}"/>
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="Name"/>
                                </f:facet>
                                <h:outputText value="#{item2.name}"/>
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="Place"/>
                                </f:facet>
                                <h:outputText value="#{item2.place}"/>
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="StartDate"/>
                                </f:facet>
                                <h:outputText value="#{item2.startDate.time}">
                                    <f:convertDateTime pattern="dd/MM/yyyy"/>
                                </h:outputText>
                            </h:column>
                        </h:dataTable>

                    </h:form>
                </f:view>
            </ui:define>

        </ui:composition>

    </body>
</html>

